package com.lavender.transaction.service.impl;

import com.lavender.transaction.entity.User;
import com.lavender.transaction.mapper.UserMapper;
import com.lavender.transaction.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectById(Long id) {
        return userMapper.selectById(id);
    }

    @Override
    public int deleteById(Long id) {
        return userMapper.deleteById(id);
    }

    @Override
    public int insert(User record) {
        return userMapper.insert(record);
    }

    @Override
    public int updateByIdSelective(User record) {
        return userMapper.updateByIdSelective(record);
    }

    @Override
    public User selectByUserId(User user) {
        return userMapper.selectByUserId(user);
    }

    @Override
    public int deleteByUserId(User user) {
        return userMapper.deleteByUserId(user);
    }

    @Override
    public int updateByUserId(User user) {
        return userMapper.updateByUserId(user);
    }

    @Override
    public int deleteAll() {
        return userMapper.deleteAll();
    }
}
